﻿//using MaterialDesignColors;
//using MaterialDesignColors.ColorManipulation;
//using MaterialDesignThemes.Wpf;
//using System.Windows.Media;

//namespace Common
//{
//    /// <summary>
//    /// MaterialDesign 主题扩展
//    /// </summary>
//    public static class PaletteHelperExtensions
//    {
//        public static void ChangePrimaryColor(this PaletteHelper paletteHelper, Color color)
//        {
//            ITheme theme = paletteHelper.GetTheme();

//            theme.PrimaryLight = new ColorPair(color.Lighten(), theme.PrimaryLight.ForegroundColor);
//            theme.PrimaryMid = new ColorPair(color, theme.PrimaryMid.ForegroundColor);
//            theme.PrimaryDark = new ColorPair(color.Darken(), theme.PrimaryDark.ForegroundColor);

//            paletteHelper.SetTheme(theme);
//        }

//        public static void ChangeSecondaryColor(this PaletteHelper paletteHelper, Color color)
//        {
//            ITheme theme = paletteHelper.GetTheme();

//            theme.SecondaryLight = new ColorPair(color.Lighten(), theme.SecondaryLight.ForegroundColor);
//            theme.SecondaryMid = new ColorPair(color, theme.SecondaryMid.ForegroundColor);
//            theme.SecondaryDark = new ColorPair(color.Darken(), theme.SecondaryDark.ForegroundColor);

//            paletteHelper.SetTheme(theme);
//        }
//    }
//}
